package org.fruitrecognitionbasedonai.fruitrecognitionbasedonai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 * @Author: Ben
 * @Date: 2021/6/19 16:19
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_user")
public class User {

    @TableId(type = IdType.AUTO)
    private  Integer id;
    @NotNull(message = "用户名为空")
    @TableField(value = "username")
    private String userName;
    @NotNull(message = "密码为空")
    @TableField(value = "password")
    private String password;
    @NotNull(message = "邮箱为空")
    @TableField(value = "email")
    private String email;
    @NotNull(message = "手机号为空")
    @TableField(value = "phone")
    private String phone;
}